<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
		<link rel="stylesheet" type="text/css" href="../../css/weui.min.css" />
		<link rel="stylesheet" type="text/css" href="../../css/jquery-weui.min.css" />
		<link rel="stylesheet" type="text/css" href="../../css/index.css" />
		<link rel="stylesheet" type="text/css" href="../../css/mine.css" />
		<title>过磅单信息</title>
		<script src="../../js/jquery-2.1.4.js" type="text/javascript" charset="utf-8"></script>
		<script src="../../js/baseConfig.js" type="text/javascript" charset="utf-8"></script>
	</head>
	<style type="text/css">
		.nameWarp,
		.childName {
			width: 100%;
			height: auto;
			overflow: hidden;
		}
		
		.nameWarp .firstName {
			width: 100%;
			height: 1.55rem;
			background: #eee;
			line-height: 1.55rem;
		}
		
		.childName li {
			width: 100%;
			height: 1.55rem;
			font-size: 0.75rem;
			line-height: 1.55rem;
			border-bottom: 1px solid #eee;
		}
		
		.firstName span:nth-of-type(1) {
			display: inline-block;
			float: left;
			width: 50%;
			padding-left: 1.1rem;
			box-sizing: border-box;
		}
		
		.firstName span:nth-of-type(2),
		.childName li span:nth-of-type(2) {
			display: inline-block;
			float: left;
			width: 50%;
			text-align: right;
			box-sizing: border-box;
			padding-right: 1.15rem;
		}
		.childName li span:nth-of-type(1) {
			display: inline-block;
			float: left;
			width: 50%;
			padding-left: 1.1rem;
			box-sizing: border-box;
		}		
		.identity-type {
		    width: 100%;
		    height: 1.55rem;
		    background: #28c81e;
		    line-height: 1.55rem;
		    padding: 0 1.15rem;
		    color: #fff;
		}
	</style>

	<body>
		<div id="nameWarp">
			<!--<div class="nameWarp">
				<div class="firstName">
					<span>电冰箱</span>
					<span>51台</span>
					<span>460KG</span>
				</div>
				<ul class="childName">
					<li>
						<span>CRT彩色电视机-21寸</span>
						<span>23台</span>
						<span>230KG</span>
					</li>
					<li>
						<span>CRT彩色电视机-21寸</span>
						<span>23台</span>
						<span>230KG</span>
					</li>
					<li>
						<span>CRT彩色电视机-21寸</span>
						<span>23台</span>
						<span>230KG</span>
					</li>
				</ul>
			</div>-->
		</div>
	</body>
	<script type="text/javascript">
		$.ajax({
				type: "get",
				url: baseConfig.localHttp + "weChatApi/fgclient/getMteZhiJianInfo",
				async: false,
				headers: {
					'Content-Type': 'application/x-www-form-urlencoded'
				},
				data: {
					carId: baseConfig.GetQueryString("carId"),
				},
				success: function(data) {
					console.log(data)
//					$.hideLoading();
					if(data.code == 100) {
						var list = data.content;
						var $div = ""
						for(var i=0;i<list.length;i++){		
							var $child = ""
							for(var j=0;j<list[i].qualityList.length;j++){
								$child += "<li><span>"+list[i].qualityList[j].qualityName+"</span><span>"+list[i].qualityList[j].counts+"台</span></li>"
							}
							$div += "<div class='nameWarp'><div class='identity-type'><span>"+list[i].firstParentName+"</span></div><ul class='childName'>"+$child+"</ul></div>"
						}
						$("#nameWarp").append($div)
				} else {
						$.toptip(data.content, 1200, 'error');
					}
				},
				error: function() {
					$.hideLoading();
					$.toast("请求失败", "cancel");
				}
			})			
	</script>

</html>